/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.brain.core.dto;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Indra
 */
@Entity
@Table(name = "TCORE_FERIADO")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FeriadoDto.findAll", query = "SELECT f FROM FeriadoDto f"),
    @NamedQuery(name = "FeriadoDto.findById", query = "SELECT f FROM FeriadoDto f WHERE f.id = :id"),
    @NamedQuery(name = "FeriadoDto.findByDescripcion", query = "SELECT f FROM FeriadoDto f WHERE f.descripcion = :descripcion"),
    @NamedQuery(name = "FeriadoDto.findByIndicadorFeriado", query = "SELECT f FROM FeriadoDto f WHERE f.indicadorFeriado = :indicadorFeriado"),
    @NamedQuery(name = "FeriadoDto.findByUbigeo", query = "SELECT f FROM FeriadoDto f WHERE f.ubigeo = :ubigeo"),
    @NamedQuery(name = "FeriadoDto.findByFecha", query = "SELECT f FROM FeriadoDto f WHERE f.fecha = :fecha")})
public class FeriadoDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private Long id;
    @Size(max = 120)
    @Column(name = "DESCRIPCION")
    private String descripcion;
    @Column(name = "INDICADOR_FERIADO")
    private Character indicadorFeriado;
    @Column(name = "UBIGEO")
    private Long ubigeo;
    @Column(name = "FECHA")
    @Temporal(TemporalType.DATE)
    private Date fecha;

    public FeriadoDto() {
    }

    public FeriadoDto(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public Character getIndicadorFeriado() {
        return indicadorFeriado;
    }

    public void setIndicadorFeriado(Character indicadorFeriado) {
        this.indicadorFeriado = indicadorFeriado;
    }

    public Long getUbigeo() {
        return ubigeo;
    }

    public void setUbigeo(Long ubigeo) {
        this.ubigeo = ubigeo;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FeriadoDto)) {
            return false;
        }
        FeriadoDto other = (FeriadoDto) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.brain.core.dto.FeriadoDto[ id=" + id + " ]";
    }
    
}
